package service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.MerchantDao;
import pojo.Merchant;
import service.MerchantService;

@Service
@Transactional
public class MerchantServiceImpl implements MerchantService {
	
	@Resource(name="merchantDaoImpl")
	private MerchantDao merchantDao;
	
	/*@Override
	public List<Merchant> getAllWarehouses() {
		return merchantDao.findAll();
	}
*/
	@Override

	public Merchant register(Merchant merchant) {
		
		
		
		
		return merchantDao.add(merchant);	
	}


	@Override
	public Merchant login(Merchant merchant) {
		return merchantDao.login(merchant);
	}


	@Override
	public Merchant add(Merchant merchant) {
		return merchantDao.add(merchant);
	}


	@Override
	public Merchant update(Merchant merchant) {
		return merchantDao.update(merchant);
	}

}
